package com.mc.service.impl;

import com.mc.bean.Role;
import com.mc.dao.Impl.RoleDaoImpl;
import com.mc.dao.RoleDao;
import com.mc.service.RoleService;

import java.util.List;

/**
 * @author zh
 * 角色（权限）业务逻辑接口接口实现
 */
public class RoleServiceImpl implements RoleService {
   RoleDao roleDao=new RoleDaoImpl();
    @Override
    public List<Role> findAll() {
        return roleDao.findAll();
    }

    @Override
    public Role findRid(int rid) {
        return roleDao.findRid(rid);
    }

    @Override
    public boolean add(Role role) {
        return roleDao.add(role)>0?true:false;
    }

    @Override
    public boolean delete(int rid) {
        return roleDao.delete(rid)>0?true:false;
    }

    @Override
    public boolean update(Role role) {
        return roleDao.update(role)>0?true:false;
    }
}
